package pl.kemot;

import com.vaadin.Application;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.Window;

public class JelonekApplication extends Application {
	private static final long serialVersionUID = 1L;
	private Window window;

	@Override
	public void init() {
		window = new Window("Jelonek Application");
		setMainWindow(window);
		Button btnFirst = new Button("First");
		btnFirst.addListener(new FirstListener());
		window.addComponent(btnFirst);
	}

	private final class FirstListener implements Button.ClickListener {
		private static final long serialVersionUID = 1L;

		public void buttonClick(ClickEvent event) {
			window.addComponent(new Label("Thank you for clicking"));
		}
	}
}
